﻿using System;
using System.Linq;
using System.Threading.Tasks;

namespace MyHome.Server.PluginBase
{
    /// <summary>
    /// A plugin that outputs data from the system. This can be something like a console output or data for an external system like DMX lightning.
    /// </summary>
    /// <typeparam name="T">The type of data which this plugin can output</typeparam>
    public interface IOutputPlugin<T> : IPlugin
    {
        /// <summary>
        /// Sends the output asynchronous.
        /// </summary>
        /// <param name="value">The value of data to output.</param>
        /// <returns>A value indicating the success of this operation.</returns>
        Task<bool> SendOutputAsync(T value);
    }
}